package c.h.a.k0.a;

import android.content.Context;
import android.os.Bundle;
import android.os.Vibrator;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import c.h.a.m0.h;
import c.h.a.y.a;
import com.liuzh.deviceinfo.tests.TestesActivity;

/* compiled from: VolumeUpTestFragment */
public class h0 extends a {
    public ImageView W;
    public Vibrator X;
    public View Y;

    public void D(Context context) {
        super.D(context);
        ((TestesActivity) context).setTitle(2131690558);
    }

    public View G(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        if (this.Y == null) {
            View inflate = layoutInflater.inflate(2131493072, viewGroup, false);
            this.Y = inflate;
            ((TextView) inflate.findViewById(2131296715)).setText(2131690559);
            this.W = (ImageView) this.Y.findViewById(2131296633);
            if (s().getConfiguration().orientation == 2) {
                this.W.setTranslationY((float) (-h.t(60.0f, s().getDisplayMetrics())));
            }
            this.W.setImageResource(2131231126);
            this.Y.findViewById(2131296650).setOnClickListener(new v(this));
            this.Y.findViewById(2131296653).setOnClickListener(new u(this));
            this.X = (Vibrator) Z().getSystemService("vibrator");
        }
        return this.Y;
    }

    public boolean o0(int i, KeyEvent keyEvent) {
        if (i != 24) {
            return false;
        }
        this.W.setImageResource(2131231127);
        Vibrator vibrator = this.X;
        if (vibrator != null && vibrator.hasVibrator()) {
            this.X.vibrate(400);
        }
        return true;
    }

    public boolean p0(int i, KeyEvent keyEvent) {
        if (i != 24) {
            return false;
        }
        this.W.setImageResource(2131231126);
        return true;
    }
}
